package com.zjhb.common.enumutil;

public enum Remark {
	Good("1", "满意"),
	Bad("0", "不满意"),
	Generor("2","一般");

	private String key;
	private String value;

	private Remark(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static Remark parse(String key) {
		Remark [] areas=Remark.values();
		for(Remark a:areas){
			if(a.getKey().equals(key)){
				return a;
			}
		}
        return null;
	}

	public static Remark parseValue(String value) {
		Remark [] areas=Remark.values();
		for(Remark a:areas){
			if(a.getValue().equals(value)){
				return a;
			}
		}
        return null;
	}



}
